package com.example.diabeco;

//import java.util.ArrayList;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
//import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
//import android.widget.Toast;

public class CheckBoxDialogFragment extends DialogFragment {
	//Obtenemos la actividad que llamo al "Fragment"
	Activity activity = getActivity();
	
	@Override
	public Dialog onCreateDialog(Bundle savedInstanceState) {
//	    mSelectedItems = new ArrayList();  // Where we track the selected items
	    AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
	    
	    // Set the dialog title
//	    builder.setTitle(R.string.pick_toppings);
	    
	    // Specify the list array, the items to be selected by default (null for none),
	    // and the listener through which to receive callbacks when items are selected
//	           builder.setMultiChoiceItems(R.array.toppings, null,
//	                      new DialogInterface.OnMultiChoiceClickListener() {
//	               @Override
//	               public void onClick(DialogInterface dialog, int which,
//	                       boolean isChecked) {
////	                   if (isChecked) {
//	                       // If the user checked the item, add it to the selected items
////	                       mSelectedItems.add(which);
//	                       
////	                   } else if (mSelectedItems.contains(which)) {
//	                       // Else, if the item is already in the array, remove it 
////	                       mSelectedItems.remove(Integer.valueOf(which));
////	                   }
//	               }
//	           });
	           
//	    // Set the action buttons
//	           builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
//	               @Override
//	               public void onClick(DialogInterface dialog, int id) {
//	                   // User clicked OK, so save the mSelectedItems results somewhere
//	                   // or return them to the component that opened the dialog
//	          
//	               }
//	           });
//	           
//	           builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
//	               @Override
//	               public void onClick(DialogInterface dialog, int id) {
//	             
//	               }
//	           });

	    return builder.create();
	}

}
